package com.sdgakj.entity;

import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;


@Entity
@Table(name = "f_donation")
public class Donation extends IdEntity {
	
	private static final long serialVersionUID = 1L;
	
    /** 用户id*/
    private Long userId;
    /*联系电话*/
    private String authTel;
	/** 募捐数额*/
	private Double amount;
    /** 创建时间 */
    private Date createtime;

    private Date updatetime;

    /** 交易完成(打款)时间O */
    private Date completeTime;

    private Integer state;
	/** 乐观*/
	private Integer versionNum;
    /** 已募捐单数*/
    private  Integer realNum;
    /** 募捐单数*/
    private Integer targetNum;
    /** 订单名称 */
    private String title;
    /** 订单描述 */
    private String oDesp;
    /**      支付账号    */
    private String account;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }


	public Double getAmount() {
		return amount;
	}
	public void setAmount(Double amount) {
		this.amount = amount;
	}
	
    public String getAuthTel() {
        return authTel;
    }

    public void setAuthTel(String authTel) {
        this.authTel = authTel;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getCompleteTime() {
        return completeTime;
    }

    public void setCompleteTime(Date completeTime) {
        this.completeTime = completeTime;
    }

    public Integer getRealNum() {
        return realNum;
    }

    public void setRealNum(Integer realNum) {
        this.realNum = realNum;
    }

    public Integer getTargetNum() {
        return targetNum;
    }

    public void setTargetNum(Integer targetNum) {
        this.targetNum = targetNum;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getoDesp() {
        return oDesp;
    }

    public void setoDesp(String oDesp) {
        this.oDesp = oDesp;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Version
	public Integer getVersionNum() {
		return versionNum;
	}
	public void setVersionNum(Integer versionNum) {
		this.versionNum = versionNum;
	}
	
}
